<template>
  <div class="container">
    <!-- 顶部区域 -->
    <div class="info-box">
      <van-image
        width="64"
        height="64"
        round
        fit="cover"
        src="https://img01.yzcdn.cn/vant/cat.jpeg"
      />
      <h2 class="name">
        黑马李宗盛
        <br />
        <van-tag type="primary" color="#fff" text-color="#3296fa" class="mytag"
          >2021-6-23</van-tag
        >
      </h2>
    </div>
    <!-- 我的作品部分 -->
    <div class="user-nav">
      <van-row>
        <van-col span="8">
          <van-icon name="newspaper-o" color="#7af" />我的作品
        </van-col>
        <van-col span="8">
          <van-icon name="star-o" color="#f00" />我的收藏
        </van-col>
        <van-col span="8">
          <van-icon name="tosend" color="#fa0" />阅读历史
        </van-col>
      </van-row>
    </div>
    <div class="info">
      <van-cell title="编辑资料" icon="edit" is-link />
      <van-cell title="小智同学" icon="chat-o" is-link />
      <van-cell title="系统设置" icon="setting-o" is-link />
      <van-cell title="退出登录" icon="info-o" is-link />
    </div>
  </div>
</template>

<script>
export default {
  name: 'user'
}
</script>

<style lang="less">
.container {
  /* 头部 */
  .info-box {
    height: 100px;
    background-color: #3296fa;
    display: flex;
    align-items: center;
    padding-left: 15px;
    .name {
      font-size: 18px;
      margin-left: 15px;
      color: white;
      font-weight: normal;
      .mytag {
        padding: 2px;
        font-size: 12px;
        background-color: #fff;
        color: #0098fa;
      }
    }
  }
  /* 我的作品部分 */
  .user-nav {
    padding: 15px 0;
    font-size: 12px;
    text-align: center;
    background-color: #fff;
    .van-icon {
      display: block;
      font-size: 24px;
      padding-bottom: 5px;
    }
  }
}
</style>
